"Bazel dependencies"

module(
    name = "rules_devicetree",

    # NOTE:
    version = "0.1.3",
    #
    # Always leave version unset or set to "" (the default). The default value
    # can prevent issues when the module is used via non-registry overrides
    # (e.g. https://github.com/bazel-contrib/rules_go/issues/4380).
    #
    # The publish.yaml GitHub Action sets the version in the registry to the
    # release version by patching this MODULE.bazel file in the pull request to
    # the BCR.
    #
    # For more info, see this Slack thread:
    # https://bazelbuild.slack.com/archives/CA31HN1T3/p1750406404452179

    # NOTE:
    # compatibility_level = 0,
    #
    # Bumping compatibility_level too frequently is discouraged because it's
    # very disruptive: as soon as a module is requested at two different
    # compatibility levels in the dependency tree, users will see an error.
    #
    # As such, the compatibility_level (1) should be bumped *only* when the
    # breaking change affects most use cases and isn't easy to migrate and/or
    # work-around, and (2) *in the same commit* that introduces an incompatible
    # (breaking) change.
)

bazel_dep(name = "bazel_skylib", version = "1.7.0")
bazel_dep(name = "package_metadata", version = "0.0.2")
bazel_dep(name = "platforms", version = "0.0.5")
bazel_dep(name = "rules_cc", version = "0.0.16")

bazel_dep(name = "gazelle", version = "0.35.0", dev_dependency = True, repo_name = "bazel_gazelle")
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.1", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.19.4", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2", dev_dependency = True)
bazel_dep(name = "rules_python", version = "1.5.0", dev_dependency = True)

autodetected_toolchain_repo = use_repo_rule("//devicetree/private:autodetected_toolchain_repo.bzl", "autodetected_toolchain_repo")

autodetected_toolchain_repo(
    name = "autodetected_toolchain",
)

register_toolchains("@autodetected_toolchain//:all")
